Optimal. Leaf size=317 \[ \frac {(19 A-15 B) \text {ArcTan}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{2 \sqrt {2} a^{3/2} d}-\frac {(1201 A-1029 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{210 a d \sqrt {a+a \cos (c+d x)}}+\frac {(397 A-273 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{210 a d \sqrt {a+a \cos (c+d x)}}-\frac {(67 A-63 B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{70 a d \sqrt {a+a \cos (c+d x)}}-\frac {(A-B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}+\frac {(11 A-7 B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{14 a d \sqrt {a+a \cos (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.71, antiderivative size = 317, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 6, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {3040, 3057,
3063, 12, 2861, 211} \begin {gather*} \frac {(19 A-15 B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \text {ArcTan}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {\cos (c+d x)} \sqrt {a \cos (c+d x)+a}}\right )}{2 \sqrt {2} a^{3/2} d}+\frac {(11 A-7 B) \sin (c+d x) \sec ^{\frac {7}{2}}(c+d x)}{14 a d \sqrt {a \cos (c+d x)+a}}-\frac {(A-B) \sin (c+d x) \sec ^{\frac {7}{2}}(c+d x)}{2 d (a \cos (c+d x)+a)^{3/2}}-\frac {(67 A-63 B) \sin (c+d x) \sec ^{\frac {5}{2}}(c+d x)}{70 a d \sqrt {a \cos (c+d x)+a}}+\frac {(397 A-273 B) \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x)}{210 a d \sqrt {a \cos (c+d x)+a}}-\frac {(1201 A-1029 B) \sin (c+d x) \sqrt {\sec (c+d x)}}{210 a d \sqrt {a \cos (c+d x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 211
Rule 2861
Rule 3040
Rule 3057
Rule 3063
Rubi steps
\begin {align*} \int \frac {(A+B \cos (c+d x)) \sec ^{\frac {9}{2}}(c+d x)}{(a+a \cos (c+d x))^{3/2}} \, dx &=\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {A+B \cos (c+d x)}{\cos ^{\frac {9}{2}}(c+d x) (a+a \cos (c+d x))^{3/2}} \, dx\\ &=-\frac {(A-B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}+\frac {\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\frac {1}{2} a (11 A-7 B)-4 a (A-B) \cos (c+d x)}{\cos ^{\frac {9}{2}}(c+d x) \sqrt {a+a \cos (c+d x)}} \, dx}{2 a^2}\\ &=-\frac {(A-B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}+\frac {(11 A-7 B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{14 a d \sqrt {a+a \cos (c+d x)}}+\frac {\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {-\frac {1}{4} a^2 (67 A-63 B)+\frac {3}{2} a^2 (11 A-7 B) \cos (c+d x)}{\cos ^{\frac {7}{2}}(c+d x) \sqrt {a+a \cos (c+d x)}} \, dx}{7 a^3}\\ &=-\frac {(67 A-63 B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{70 a d \sqrt {a+a \cos (c+d x)}}-\frac {(A-B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}+\frac {(11 A-7 B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{14 a d \sqrt {a+a \cos (c+d x)}}+\frac {\left (2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\frac {1}{8} a^3 (397 A-273 B)-\frac {1}{2} a^3 (67 A-63 B) \cos (c+d x)}{\cos ^{\frac {5}{2}}(c+d x) \sqrt {a+a \cos (c+d x)}} \, dx}{35 a^4}\\ &=\frac {(397 A-273 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{210 a d \sqrt {a+a \cos (c+d x)}}-\frac {(67 A-63 B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{70 a d \sqrt {a+a \cos (c+d x)}}-\frac {(A-B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}+\frac {(11 A-7 B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{14 a d \sqrt {a+a \cos (c+d x)}}+\frac {\left (4 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {-\frac {1}{16} a^4 (1201 A-1029 B)+\frac {1}{8} a^4 (397 A-273 B) \cos (c+d x)}{\cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \cos (c+d x)}} \, dx}{105 a^5}\\ &=-\frac {(1201 A-1029 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{210 a d \sqrt {a+a \cos (c+d x)}}+\frac {(397 A-273 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{210 a d \sqrt {a+a \cos (c+d x)}}-\frac {(67 A-63 B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{70 a d \sqrt {a+a \cos (c+d x)}}-\frac {(A-B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}+\frac {(11 A-7 B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{14 a d \sqrt {a+a \cos (c+d x)}}+\frac {\left (8 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {105 a^5 (19 A-15 B)}{32 \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}} \, dx}{105 a^6}\\ &=-\frac {(1201 A-1029 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{210 a d \sqrt {a+a \cos (c+d x)}}+\frac {(397 A-273 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{210 a d \sqrt {a+a \cos (c+d x)}}-\frac {(67 A-63 B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{70 a d \sqrt {a+a \cos (c+d x)}}-\frac {(A-B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}+\frac {(11 A-7 B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{14 a d \sqrt {a+a \cos (c+d x)}}+\frac {\left ((19 A-15 B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}} \, dx}{4 a}\\ &=-\frac {(1201 A-1029 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{210 a d \sqrt {a+a \cos (c+d x)}}+\frac {(397 A-273 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{210 a d \sqrt {a+a \cos (c+d x)}}-\frac {(67 A-63 B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{70 a d \sqrt {a+a \cos (c+d x)}}-\frac {(A-B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}+\frac {(11 A-7 B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{14 a d \sqrt {a+a \cos (c+d x)}}-\frac {\left ((19 A-15 B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{2 a^2+a x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}}\right )}{2 d}\\ &=\frac {(19 A-15 B) \tan ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{2 \sqrt {2} a^{3/2} d}-\frac {(1201 A-1029 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{210 a d \sqrt {a+a \cos (c+d x)}}+\frac {(397 A-273 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{210 a d \sqrt {a+a \cos (c+d x)}}-\frac {(67 A-63 B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{70 a d \sqrt {a+a \cos (c+d x)}}-\frac {(A-B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}+\frac {(11 A-7 B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{14 a d \sqrt {a+a \cos (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 3.12, size = 262, normalized size = 0.83 \begin {gather*} \frac {\cos ^3\left (\frac {1}{2} (c+d x)\right ) \left (\frac {i (19 A-15 B) e^{-\frac {1}{2} i (c+d x)} \sqrt {\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}} \sqrt {1+e^{2 i (c+d x)}} \tanh ^{-1}\left (\frac {1-e^{i (c+d x)}}{\sqrt {2} \sqrt {1+e^{2 i (c+d x)}}}\right )}{d}-\frac {(2339 A-2751 B+24 (213 A-217 B) \cos (c+d x)+60 (67 A-63 B) \cos (2 (c+d x))+1608 A \cos (3 (c+d x))-1512 B \cos (3 (c+d x))+1201 A \cos (4 (c+d x))-1029 B \cos (4 (c+d x))) \sec \left (\frac {1}{2} (c+d x)\right ) \sec ^{\frac {7}{2}}(c+d x) \tan \left (\frac {1}{2} (c+d x)\right )}{840 d}\right )}{(a (1+\cos (c+d x)))^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(730\) vs.
\(2(270)=540\).
time = 0.52, size = 731, normalized size = 2.31
method | result | size |
default | \(\frac {\left (1995 A \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\cos ^{4}\left (d x +c \right )\right ) \sin \left (d x +c \right )-1575 B \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\cos ^{4}\left (d x +c \right )\right ) \sin \left (d x +c \right )+7980 A \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right )-6300 B \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right )+11970 A \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )-9450 B \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+7980 A \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \cos \left (d x +c \right ) \sin \left (d x +c \right )-6300 B \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \cos \left (d x +c \right ) \sin \left (d x +c \right )+1995 A \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \sin \left (d x +c \right )-1575 B \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \sin \left (d x +c \right )-1201 A \left (\cos ^{5}\left (d x +c \right )\right ) \sqrt {2}+1029 B \left (\cos ^{5}\left (d x +c \right )\right ) \sqrt {2}+397 A \left (\cos ^{4}\left (d x +c \right )\right ) \sqrt {2}-273 B \left (\cos ^{4}\left (d x +c \right )\right ) \sqrt {2}+1000 A \left (\cos ^{3}\left (d x +c \right )\right ) \sqrt {2}-840 B \left (\cos ^{3}\left (d x +c \right )\right ) \sqrt {2}-232 A \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {2}+168 B \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {2}+96 A \cos \left (d x +c \right ) \sqrt {2}-84 B \cos \left (d x +c \right ) \sqrt {2}-60 A \sqrt {2}\right ) \cos \left (d x +c \right ) \left (\frac {1}{\cos \left (d x +c \right )}\right )^{\frac {9}{2}} \sqrt {a \left (1+\cos \left (d x +c \right )\right )}\, \left (\sin ^{5}\left (d x +c \right )\right ) \sqrt {2}}{420 d \left (-1+\cos \left (d x +c \right )\right )^{3} \left (1+\cos \left (d x +c \right )\right )^{4} a^{2}}\) | \(731\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 237, normalized size = 0.75 \begin {gather*} -\frac {105 \, \sqrt {2} {\left ({\left (19 \, A - 15 \, B\right )} \cos \left (d x + c\right )^{5} + 2 \, {\left (19 \, A - 15 \, B\right )} \cos \left (d x + c\right )^{4} + {\left (19 \, A - 15 \, B\right )} \cos \left (d x + c\right )^{3}\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {\cos \left (d x + c\right )}}{\sqrt {a} \sin \left (d x + c\right )}\right ) + \frac {2 \, {\left ({\left (1201 \, A - 1029 \, B\right )} \cos \left (d x + c\right )^{4} + 12 \, {\left (67 \, A - 63 \, B\right )} \cos \left (d x + c\right )^{3} - 28 \, {\left (7 \, A - 3 \, B\right )} \cos \left (d x + c\right )^{2} + 12 \, {\left (3 \, A - 7 \, B\right )} \cos \left (d x + c\right ) - 60 \, A\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{420 \, {\left (a^{2} d \cos \left (d x + c\right )^{5} + 2 \, a^{2} d \cos \left (d x + c\right )^{4} + a^{2} d \cos \left (d x + c\right )^{3}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (A+B\,\cos \left (c+d\,x\right )\right )\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{9/2}}{{\left (a+a\,\cos \left (c+d\,x\right )\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________